-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(typings): fixed compiler errors when using @next version of typescript #1700
Conversation
As per microsoft/TypeScript#7662 the error is a breaking change to TypeScript 2.0. The fix is to block scope the variable. |
constructor(private callbackFunc: Function, | ||
private selector: Function, | ||
private args: any[], | ||
constructor(public callbackFunc: Function, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe we can make dispatch
static method in boundcallbackObservable
? I would prefer to not expose these values as public.
Can we merge this change in? We would like to use TS 1.9 in angular2 as soon as possible. Also, I see another error with @next, microsoft/TypeScript#8795 I recommend tacking on this change: rewrite for constructor(protected destination?: Observer<T>, protected source?: Observable<T>) {
super();
} to constructor(destination?: Observer<T>, source?: Observable<T>) {
super();
this.destination = destination;
this.source = source;
} so that it is clear that the arguments are optional but the field declarations are not. Or just make the field declarations in Observable optional too (but that would require all consumers to use 1.9). |
3291d48
to
278ed7b
Compare
Is my understanding correct above behavior (mark field optional) will be fixed by ts compiler eventually? |
I'm sure it will, but doesn't seem like much harm to make them fields to get it working today. |
Those practices are widespread in our codebase not only in thise, so concerned even we apply immediate fix for this change there are still places have broken behavior. Maybe better to track compiler updates to resolve issue completely. |
doesn't matter to me, I can flip it back. 😄 |
LGTM. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
This fixes two of the compiler errors that are issues with the
vNext
version of TypeScript (currently named 1.9, soon to be 2.0 I believe).The third error is a compiler issue, so I have made no changes to
FromEventObservable
.Related issue (if exists):
#1697